<template>
    <span class="el-svg-icon-container">
        <el-tooltip content="Top center" placement="bottom">
            <ElIcon 
        v-if="aIconName && aIconName.includes('el-icon')"
        :color="aColor"
        :size="aSize"
        >
            <component :is="aIconName" />
        </ElIcon>
        <SvgIcon 
            v-else
            :a-color="aColor"
            :a-size="aSize"
            :a-icon="aIconName"
        >
        </SvgIcon>
        </el-tooltip>  
    </span>
</template>
<script setup lang='ts'>
import SvgIcon from '../svg_icon/svg_icon_index.vue';
    //#region defineXxx
    defineOptions({
        name:'el_svg_icon'
    });

    const props=defineProps({
        aIconName:{
            type:String,
            required:true
        },
        aColor:{
            type:String,
            default:'currentColor'
        },
        aSize:{
            type:Number,
            default:12
        }
    });

    //#endregion
    
    
</script>
<style lang='less' scoped>
    
</style>